import Vue from 'vue'
import Router from 'vue-router'
import Hbody from '@/components/HomePage/Hbody'
import Details from "@/components/Details/Details"
import Submit from "@/components/Shopping/Submit"
import ShoppingCar from "@/components/Shopping/Shopping-car"
import Pay from "@/components/Shopping/Pay"
import Search from '@/components/Details/Search'
import ClassifiCation from '@/components/Details/ClassifiCation'
import user from '@/components/user/user'
import wait from '@/components/user/Order/wait'
import goods from '@/components/user/Order/goods'
import Already from '@/components/user/Order/Already'
import end from '@/components/user/Order/End'
import car from '@/components/user/security/car'
import addcar from '@/components/user/security/addcar'
import password from '@/components/user/security/password'
import num from '@/components/user/security/num'
import name from '@/components/user/security/name'
Vue.use(Router);

export default new Router({
  routes: [
    {
      path:'/',
      name:"Hbody",
      component:Hbody,
    },
    {
      path:'/details',
      name:'Details',
      component:Details
    },
    {
      path:'/shoppingcar',
      name:'ShoppingCar',
      component:ShoppingCar
    },
    {
      path:'/Search',
      name:'Search',
      component:Search
    },
    {
      path:'/ClassifiCation',
      name:'ClassifiCation',
      component:ClassifiCation
    },
    {
      path:'/user',
      name:'user',
      component:user,
      children:[
        {
        path:'/user/wait',
        name:'wait',
        component:wait,
        },
        {
          path:'/user/Already',
          name:'Already',
          component:Already,
        },
        {
          path:'/user/end',
          name:'end',
          component:end,
        },
        {
          path:'/user/goods',
          name:'goods',
          component:goods,
        },
        {
          path:'/user/car',
          name:'car',
          component:car,
        },{
          path:'/user/addcar',
          name:'addcar',
          component:addcar,
        },
        {
          path:'/user/password',
          name:'password',
          component:password,
        },
        {
          path:'/user/num',
          name:'num',
          component:num,
        },
        {
          path:'/user/name',
          name:'name',
          component:name,
        }
    ]
    },
    {
      path:'/submit',
      name:'Submit',
      component:Submit
    },
    {
      path:'/pay',
      name:'Pay',
      component:Pay
    }
  ]
})
